import 'package:flutter/material.dart';
import 'package:spring_dict/EventBus/EventBus.dart';

final globalBus = EventBus.singleton(key: "application");
//const primaryColor = Color(0xFFff7979);
const primaryColor = Colors.deepPurple;

void log(Object message, {Object context}){
  message = "****************$context LOG ****************"
      "\n"
      "$message"
      "\n"
      "**************** LOG END ****************";
  globalBus.publish("application.log", message);
}

void applyLogger(){

  globalBus.subscribeIfNotExists("application.log", (bus, message){
    print(message);
  });

  globalBus.subscribeIfNotExists("application.log", (bus, message){
    //network.uploadLog(message)
  });

}